package com.lf.cloud.comm.dao;

import java.util.List;

import com.lf.cloud.comm.modal.pojo.Enums;
import com.lf.cloud.comm.webutils.CommMethod;

public class EnumsDao extends Enums {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	
	public static EnumsDao me = new EnumsDao();
	
	
	public List<Enums> geetEnumsList(String key){
		String sql = "select * from "+ CommMethod.getTbaleName("Enums") +" where 1=1 and " ;
		sql += " ekey = '"+key+"'";
		return dao.find(sql);
	}
	
	public String geetEnumsVal(String key){
		String result = null;
		List<Enums> geetEnumsList = this.geetEnumsList(key);
		if(geetEnumsList!=null && geetEnumsList.size()>0){
			result = geetEnumsList.get(0).getEvalue();
		}
		return result;
	}
	
	
	
	
	
	
}
